<?php // $this->load->view('layouts/_flash'); ?>
<div class="row">

<div class="row collapse">
	<div class="large-3 small-3 columns">
		<span class="prefix"><strong>Search Employees:</strong></span>
	</div>
	<form action="" method="POST">
	<div class="large-6 small-6 columns">
		<input id="student_enrollment_id" class="searchInput" required autocomplete="off" placeholder="Search Employees." url="<?=site_url('output/ajax_search_employees');?>" type="text" name="student_search_data" autofocus>
	</div>
	<div class="large-3 small-3 columns">
		<input type="submit" name="search" class="button postfix" value="Search">
	</div>
	</form>
</div>

<div class="panel"><h6>Employees</h6></div>
	<?if(isset($system_message))echo $system_message;?>
	<table class="table">
		<tr>
			<th colspan="3"><a href="<?=site_url('hrd/new_employee');?>" class="confirm btn btn-mini btn-success" title="add new employee?">Add New Employee</a></th>
		</tr>
		<?if($employee_data):?>
			<?$counter = 1?>
			<tr>
			<?foreach($employee_data as $k => $v):?>
				<td style="text-align:center;">
					<a href="<?=site_url('hrd/edit_employee/'.__link(intval($v->emp_id)));?>"><img style="border:2px solid #000;" src="<?=employee_thumbs(__link(intval($v->emp_id)),$v->gender);?>"/></a><br>
					<a href="<?=site_url('hrd/edit_employee/'.__link(intval($v->emp_id)));?>"><?=ucwords(strtolower($v->fullname));?></a><br>
					<strong><?=ucwords($v->role);?><i>(<?=ucwords($v->username);?>)</i></strong>
				</td>
				<?if($counter % 3 == 0):?>
					</tr>
				<?endif;?>
				<?$counter++;?>
			<?endforeach;?>
			</tr>
		<?else:?>
			<tr>
				<td colspan="3">No Employees were found.</td>
			</tr>
		<?endif;?>
	</table>
	<?=$links;?>
</div>
<script type="text/javascript" src="<?=script_url('custom/fsearch_2');?>"></script>